import React from "react";
import "./index.css";
import { ThemeProvider } from "./components/themeContext"; 
import { useEffect } from "react";
import Footer from "./components/footer";
import GoTopButton from "./components/scrolltop";
import Hamburger from "./components/hamburger";
import RouterGurad from "./components/RouterGurad";
import { routes } from "./router";

function App() {
  useEffect(() => {
    document.body.className = "p-4 bg-[#f5f5f5] min-h-screen dark:bg-dmbody";
    return () => {
      document.body.className = "";
    };
  });
  return (
    <div>
      <React.StrictMode>
        <ThemeProvider> 
          <RouterGurad routes={routes} />
          <Footer />
          <Hamburger />
          <GoTopButton />
        </ThemeProvider>
      </React.StrictMode>
    </div>
  );
}

export default App;
